<?php

/*
 *
 * @authors : IT123编程社区-mastudy
 * @email  :admin@it123.org
 * @bbs http://www.it123.org
 *  @link http://www.it123.org
 *  @Powered By  ©2016 www.it123.org[IT123编程社区]
 */



// 本类由系统自动生成，仅供测试用途
class IndexAction extends PublicAction {
	
	
	
	
	
	

    public function index() {





 

        //最新文章
        $this->assign('newArticle', $this->getArtlist(8,'article_time desc'));




        cookie('LURL', __SELF__);





        $this->display();
    }

    public function getHoTGroupList($limit = 6) {

        $groupDB = M('group');

        $where['group_verifystatus'] = 1;

        $list = $groupDB->where($where)->order('group_heat desc')->limit($limit)->select();


        $list = ToolsAction::resetGroupList($list);

        return $list;
    }

    public function getHotJokeTopic($limit = 5, $order = 'topic_likes desc') {


        $topicDB = M('group_topic');

        $where['topic_gid'] = 29;

        $where['topic_verifystatus'] = 1;
        $data = $topicDB->where($where)->order($order)->limit($limit)->select();


        $data = ToolsAction::resetTopicList($data);


        return $data;
    }


    public function getFlinklist() {

        $flinkDB = M('flink');

        $where['flink_verifystatus'] = 1;


        $list = $flinkDB->where($where)->select();


        return $list;
    }

}
